Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
SINAMICS S120 - ROS configuration
Description: This tutorial teaches you how to configure yaml and launch files according to your SIMATIC MANAGER HW config from previous tutorialKeywords: SIEMENS, CP1616, PROFINET, SINAMICS, IO Controller, yaml, launch
Tutorial Level: INTERMEDIATE
Next Tutorial: siemens_cp1616/Tutorials/SINAMICS S120 - User node
SIMATIC MANAGER configuration
In previous tutorial we have successfully configured PROFINET network including SINAMICS S120 drive and CP1616 to transfer following data between IO Controller (CP1616) and IO Device (SIMANICS S120):
The most important step on Linux side is to pass telegram configuration to ROS Wrapper. Yaml configuration files are utilized for such a purpose.
Yaml file
For telegram configuration as shown in the picture above, appropriate .yaml file will have following structure:
- label: CU_input type: input size: 4 starting_address: 512 topic: cu_input_topic - label: CU_output type: output size: 4 starting_address: 512 topic: cu_output_topic - label: Drive_1_input type: input size: 24 starting_address: 516 topic: drive_1_input_topic - label: Drive_1_output type: output size: 24 starting_address: 516 topic: drive_1_output_topic
NOTE: 1 word = 2 bytes. STARTER uses Length notation in telegram configuration so PZD12/12 means data transfer area of size 24 bytes in both directions.
Launch file
.yaml filepath needs to be uploaded on ROS Parameter server. User node can also be added to the launch file here:
<!-- Load yaml config filepath on rosparam server --> <param name="filepath" value="$(find siemens_cp1616_sinamics_s120_tutorial)/config/test_config.yaml"/> <!-- Wrapper node --> <node name="siemens_cp1616_io_controller_wrapper" pkg="siemens_cp1616" type="io_controller_wrapper" output="screen" /> <!-- User node --> <node name="siemens_cp1616_sinamics_s120_tutorial" pkg="siemens_cp1616_sinamics_s120_tutorial" type="siemens_cp1616_sinamics_s120_tutorial_node" output="screen" />
After completing configuration you can proceed to next tutorial and learn how to interface PROFINET from C++ code by creating creating simple ROS node.
Next tutorial: SINAMICS S120 - User Node.